include $(top_srcdir)/Makefile.xt
include $(wildcard *.dep)

DEFS = P.def Stratego-P.def Stratego-Stratego-P.def Stratego-Sugar-and-P-in-Stratego.def
TBLS = P.tbl Stratego-P.tbl Stratego-Stratego-P.tbl Stratego-Sugar-and-P-in-Stratego.tbl

sdfdata_DATA 	= $(TBLS) $(DEFS) $(wildcard *.sdf)
CLEANFILES	= $(TBLS)
BOOTCLEANFILES	= $(DEFS)
EXTRA_DIST   	= $(DEFS) $(wildcard *.sdf)

SDFINCLUDES  	= -I $(STRATEGO_FRONT)/share/sdf/stratego-front
PGEN_FLAGS   	= -m $*

P.def : P-AbstractDeclarators.sdf P-Constants.sdf P-Declarators.sdf \
		    P-Enumerators.sdf P-Expressions.sdf P-Identifiers.sdf \
		    P-Keywords.sdf P-Lexical.sdf P-ParameterDeclarators.sdf \
		    P-Preprocessor.sdf P-Program.sdf P-Statements.sdf \
		    P-StructsAndUnions.sdf P-Types.sdf P.sdf


Stratego-P.def : Stratego-P.sdf P.def

Stratego-Stratego-P.def : Stratego-Stratego-P.sdf P.def

Stratego-Sugar-and-P-in-Stratego.def : Stratego-Sugar-and-P-in-Stratego.sdf Stratego-P.def

